#ifndef NOTESCABINET_H
#define NOTESCABINET_H

#include <QtDebug>

#include <QWidget>
#include <QInputDialog>
#include <QVBoxLayout>
#include <QSplitter>

#include <QDomDocument>
#include <QDomNodeList>

#include "pickel.h"
#include "notesarea.h"
#include "noteslist.h"

class PicKel;

class NotesCabinet : public QWidget
	{
		Q_OBJECT

		public:
			NotesCabinet(QWidget *parent = 0);
			~NotesCabinet();

			NoteBooks *noteBooks();

		private:
			int margin;
			PicKel *parent;
			NoteBooks *notesList;
			NotesArea *notesArea;
			QVBoxLayout *layout;
			QSplitter *splitter;

		protected:
			QString getTitle(QFile &) const;

		public slots:
			void fillNotes(QTreeWidgetItem *, int);
			void updateGUI();

		private slots:
			void closeNote();
			void deleteNote();
			void newNote();
			void newNoteBook();
			void renameNote();
			void updateCloseNoteAction(QMdiSubWindow*);
			void updateNoteActions();

		signals:
			void itemDoubleClicked(QListWidgetItem*);
	};

#endif // NOTESCABINET_H
